# -*- coding: iso-8859-15 -*-

class Node:
        def __init__(self):
            self.inbox = {}
            self.outbox = {}
            
            self.estimateHolder = None
            self.initialValueHolder = None
            
            self.functor = None
            self.initializer = None
            
        def setFunctor(self, functorObj):            
            self.functor = functorObj
        def setInitValueHolder(self, initValueHolderObj):
            self.initialValueHolder = initValueHolderObj
        def setEstimateHolder(self, estimateValueHolderObj):
            self.estimateHolder = estimateValueHolderObj
        def setInitializer(self, initializeObj):
            self.initializer = initializeObj
        def getOutbox(self):
            return self.outbox
        def addMessage(self, source, msg):
            self.inbox[source] = msg
        def peek(self):
            return self.estimateHolder
        def initialize(self):
            self.initializer()
        def compute(self):
            self.dosomething()
        def dosomething(self):
            print "hello world"